#include <Area.h>

#include <World.h>
#include <BaseObject.h>


Area::Area(World& gameworld)
:world(gameworld)
,physics(gameworld.physics)
,renderer(gameworld.renderer)
,gameObjects(gameworld.gameObjects)
{
}

Area::~Area()
{
	RemoveAllObjects();
}
		
void Area::RemoveAllObjects()
{
	std::set<BaseObject*>::iterator iter = areaobjects.begin();
	for(; iter != areaobjects.end(); ++iter)
		world.RemoveObject( *iter ); 
		 
}

